/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.oracleandsxnd.erp.member.web;

import com.oracleandsxnd.erp.common.persistence.Page;
import com.oracleandsxnd.erp.common.persistence.TableSplitResult;
import com.oracleandsxnd.erp.common.web.BaseController;
import com.oracleandsxnd.erp.member.entity.MemberIntegralLog;
import com.oracleandsxnd.erp.member.service.MemberIntegralLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 会员积分管理Controller
 * @author 会员积分管理
 * @version 2019-12-13
 */
@Controller
@RequestMapping(value = "member_memberIntegralLog")
public class MemberIntegralLogController extends BaseController {

	@Autowired
	private MemberIntegralLogService memberIntegralLogService;

	@RequestMapping(value = {""})
	public String list(MemberIntegralLog memberIntegralLog, HttpServletRequest request, HttpServletResponse response, Model model) {
		return "erp/member/memberIntegralLogList";
	}

	@RequestMapping(value = {"listData"})
	@ResponseBody
	public Object listData(MemberIntegralLog memberIntegralLog , HttpServletRequest request, HttpServletResponse response){
		Page<MemberIntegralLog> page = memberIntegralLogService.findPage(new Page<MemberIntegralLog>(request, response), memberIntegralLog);
		TableSplitResult<MemberIntegralLog> result=new TableSplitResult<MemberIntegralLog>(page.getPageNo(), page.getCount(), page.getList());
		return  result;
	}

	@RequestMapping(value = {"tj"})
	public String listtj(MemberIntegralLog memberIntegralLog, HttpServletRequest request, HttpServletResponse response, Model model) {
		return "erp/member/memberIntegralLogtjList";
	}

	@RequestMapping(value = {"listtjData"})
	@ResponseBody
	public Object listtjData(MemberIntegralLog memberIntegralLog , HttpServletRequest request, HttpServletResponse response){
		Page<MemberIntegralLog> page = memberIntegralLogService.findtjPage(new Page<MemberIntegralLog>(request, response), memberIntegralLog);
		TableSplitResult<MemberIntegralLog> result=new TableSplitResult<MemberIntegralLog>(page.getPageNo(), page.getCount(), page.getList());
		return  result;
	}

}